package day3;

import java.util.Calendar;

/**
 * @author oldliu
 * @since 1.0
 */
public class CalTest {
    public static void main(String[] args) {
        Calendar c = Calendar.getInstance();//设置时区返回合适的子类
        System.out.println(c);
        System.out.println(c.getTimeInMillis());
        System.out.println(c.getTime());
        int year = c.get(Calendar.YEAR);
        System.out.println("year is ：" + year);
        int day = c.get(Calendar.DAY_OF_MONTH);
        System.out.println(day);
        int month = c.get(Calendar.MONTH);
        System.out.println("月份：" + month);

        int days = c.get(Calendar.DAY_OF_YEAR);
        System.out.println("今天是本年的第几天》"+days);
        int weekday=c.get(Calendar.WEEK_OF_YEAR);
        System.out.println(weekday);
    }
}
